# Contributor: David Demelier <markand@malikania.fr>
# Maintainer: David Demelier <markand@malikania.fr>
pkgname=ardour
pkgver=6.2.0
pkgrel=0
pkgdesc="professional-grade digital audio workstation"
url="https://ardour.org"
arch="all !ppc64le !mips64" # Does not build on ppc64le or mips64.
license="GPL-2.0-or-later"
makedepends="
	alsa-lib-dev
	atkmm-dev
	aubio-dev
	boost-dev
	fftw-dev
	gtk+2.0-dev
	gtkmm-dev
	itstool
	jack-dev
	libarchive-dev
	libexecinfo-dev
	liblo-dev
	libpng-dev
	libsamplerate-dev
	libsigc++-dev
	libsndfile-dev
	lilv-dev
	lrdf-dev
	lv2-dev
	pulseaudio-dev
	python3
	readline-dev
	redland-dev
	rubberband-dev
	serd-dev
	sratom-dev
	taglib-dev
	vamp-sdk-dev
	"
source="https://community.ardour.org/src/Ardour-$pkgver.tar.bz2
	disable-backtrace.patch
	always-link-execinfo.patch"
builddir="$srcdir/Ardour-$pkgver"

build() {
	python3 waf configure \
		--prefix=/usr \
		--optimize \
		--freedesktop \
		--no-phone-home \
		--with-backends=pulseaudio,jack,alsa,dummy
	python3 waf build
}

check() {
	python3 waf test
}

package() {
	python3 waf install --destdir="$pkgdir"
}

sha512sums="d4c20968738ec2fef382fc1109f1b17560863c4eb0f7cf5c42b79e9a610916e57e6c01985a2ca2a66b8647e99c10bd98c16e05eb81a7811e73e482f7af11e4a8  Ardour-6.2.0.tar.bz2
6f41e58e94f39831493467571f75566f02b31ef1bbdf7e65bd100ee846c9d2bb56ce8b6ce653d0ed362571935f333e3d276f047c471548c6f85453d2f5af80db  disable-backtrace.patch
ac93e7761aac490ed0675d24ac544cacc7ba4579490baf5f7da6c2cdf218f929d0bada39a3689a62affcf759d070359cdcc1a5b919aa225fcf6cde3b419e7e7b  always-link-execinfo.patch"
